import base from '@/api/baseurl';
import request from '@/utils/request'

/**
 * 查询账户册组成因子列表
 * @param {*} query 
 * @returns 
 */
export function findAccountCompositionFactor(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountCompositionFactor/findAccountCompositionFactor',
    method: 'get',
    params: query
  })
}

/**
 * 因子类型下拉框
 * @param {*} query 
 * @returns 
 */
 export function findfactortype(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountCompositionFactor/findfactortype',
    method: 'get',
    params: query
  })
}


/**
 * 单条删除因子
 * @param {*} query 
 * @returns 
 */
// export function deleteAccountCompositionFactor(query) {
//   return request({
//     baseURL: base.appBaseApi,
//     url: '/AccountCompositionFactor/deleteAccountCompositionFactor',
//     method: 'get',
//     params: query
//   })
// }
export function deleteAccountCompositionFactor(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/newdelete/formFactorDeleteConditionService',
    method: 'get',
    params: query
  })
}

/**
 * 添加新因子
 * @param {*} data 
 * @returns 
 */
export function addAccountCompositionFactor(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountCompositionFactor/addAccountCompositionFactor',
    method: 'post',
    data
  })
}
/**
 * 修改因子内容
 * @param {*} data 
 * @returns 
 */
export function updateAccountCompositionFactor(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountCompositionFactor/updateAccountCompositionFactor',
    method: 'post',
    data
  })
}
/**
 * 多行删除
 * @param {*} data 
 * @returns 
 */
export function deleteAccountCompositionFactorBatch(data) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountCompositionFactor/deleteAccountCompositionFactorBatch',
    method: 'post',
    data
  })
}





/**
 * 获取因子编号
 * @param {*} query 
 * @returns 
 */
 export function addfactorCode(query) {
  return request({
    baseURL: base.appBaseApi,
    url: '/AccountCompositionFactor/addfactor_code',
    method: 'get',
    params: query
  })
}